Highly smooth and parameter independent obstacle avoidance method for autonomous vehicle with velocity-varying obstacle

One of the primary challenges for autonomous vehicle (AV) is planning a collision-free path in dynamic environment. It is a tricky task for achieving high-performance obstacle avoidance with velocity-varying obstacle. To solve this problem, a highly smooth and parameter independent obstacle avoidance method for autonomous vehicle with velocity-varying obstacle (HSPI-OAM) is presented in this work. The proposed method uses the virtual collision point model to accurately design the desired acceleration, which makes the obtained path highly smooth. At the same time, the method gets rid of the dependence on parameter adjustment and has strong adaptability to different environments. The simulation is implemented on the Matlab-Carsim co-simulation platform, and the simulation results show that the path planned by HSPI-OAM has good performance for obstacle with acceleration.


Section 1: Introduction
Autonomous driving technology has been greatly developed due to its own merits [1,2], and obstacle avoidance is one of the key components of autonomous driving [3].According to different environments, obstacle avoidance can be divided into static obstacle avoidance and dynamic obstacle avoidance.
In a dynamic environment, obstacles need to be dealt with.This is critical for autonomous vehicles, especially those traveling at high speeds in dynamically changing environments.For this, an efficient computer vision algorithm is proposed and used for speed and depth determination of obstacles [4].For the environment perception in navigation, an obstacle detection method based on visual optical flow is proposed.This method uses the optical flow field constructed by image sequence to provide depth clues for obstacle detection, and realizes the online and real-time processing of the algorithm [5].Obstacle trajectories in dynamic collision avoidance methods are often considered linear or known, but this limitation is not accurate in many real-world situations.An obstacle motion prediction method is proposed, which can be obtained by training LSTM neural network online [6].
The first step is to implement obstacle avoidance in a static environment.A parallel genetic algorithm based on graphics processing is proposed and the quasi-optimal solution can be found in time for a fast path planning [7].In [8], an improved bat algorithm based on Cauchy disturbance and a logarithmic decreasing strategy is designed for a mobile robot, and the proposed method can significantly reduce the length of planned path.Zhu, X. H. improves the traditional D* Lite algorithm for multi-goal path planning and collision avoidance in unknown environments, and the issue of limited steering maneuverability during autonomous navigation is addressed by designing a safe distance and expanding the search range [9].For realtime path planning of mobile robot, a navigation control method using an artificial potential field (APF) algorithm and a grey wolves optimisation (GWO) method is proposed, and the navigation free from any dead-end situation [10].The above methods have achieved good performance in static environment, however, the moving of obstacle is completely ignored.
In order to implement obstacle avoidance in a dynamic environment, a strategy of trajectory planning and tracking is presented based on an artificial fish swarm algorithm (AFSA) [11].Du Toit [12]] presents a strategy for planning robot motions in uncertain environments using the reasoning about future evolution and uncertainties of the states of the moving obstacles.In [13], An Elman neural network is proposed to compensate the effect of uncertainties between the dynamic robot model and the obstacles.Kim, C. J. [14] proposes an obstacle avoidance method in the position stabilization of the wheeled mobile robots using interval type-2 fuzzy neural network, and it is robust against uncertainties.In [15], a general formulation of a predictive and multirate reactive planning method for AV in dynamic environments with uncertainty is introduced.Malone N. [16] uses a stochastic reachable set-based potential field to improve the success rate of path planning.In [11][12][13][14][15][16], although dynamic obstacle avoidance is realized, the speed of obstacle is set to a specific value and ignores the acceleration of the obstacle.In fact, the speed of obstacle may change in real time, which poses a challenge to the performance of existing obstacle avoidance methods.
In terms of the smoothness of the road, a smooth and ergonomic optimal lane-change trajectory is planned for an obstacle that moves at low speed [17].A two-stage control method is proposed for path planning in highway cruise mode [18].In order to solve the local path planning in the structured road, a Regional-Sampling RRT (RS-RRT) algorithm based path planning method is proposed for obstacle avoidance, and the search efficiency of sampling is improved by the local biasing and Gaussian distribution sampling [19].For the situation that vehicle tire friction may approach the limit in an unsmooth path, resulting in increased difficulty in path tracking and even instability of the vehicle, Liang et al. propose a variable speed method to design feasible speed and acceleration during path tracking to ensure that the vehicle will not reach the limit of tire friction [20].
In addition, using an improved artificial potential field, Zhang, Z. W. proposes a structured road-oriented motion planning framework for collision avoidance of AV [21]].The calculation time is shortened by reducing the number of design variables of the optimal path in [22].For low-moving AV, a path planning system is proposed through a supervisory control method based on a barrier function [23].A novel path planning system is presented for dynamic obstacle avoidance [24], and the velocity is considered as constraint to obtain the optimal velocity.A model predictive path-planning controller with potential functions and vehicle dynamics terms is introduced [25].In [26], a 3-D virtual dangerous potential field is constructed as a superposition of trigonometric functions of the road and the exponential function of obstacles, which can generate a desired trajectory for collision avoidance.Liu, J. C. presents a nonlinear model predictive control formulation for large-size autonomous ground vehicle with high centre of gravity at high speed [27].Good dynamic obstacle avoidance performance can be achieved in [21][22][23][24][25][26][27], while they all depend on the parameters of the evaluation function, and the same parameters may not work well in different environments.Therefore, reducing the dependence on parameters is critical to the practicability of method.
Based on the analysis of the above research status, highly smooth and parameter independent obstacle avoidance method for autonomous vehicle with velocity-varying obstacle (HSPI-OAM) is proposed to adapt to the obstacle with complex motion, and the path planned by HSPI-OAM has high smoothness and low parameter dependence.The contributions of this work are summarized below: https://doi.org/10.1371/journal.pone.0303160.t002 • For obstacle with arbitrary acceleration, the HSPI-OAM can achieve high-performance obstacle avoidance for AV, which allows it to adapt to most dynamic environments.
• The proposed virtual collision point model accurately calculates the required acceleration, thus ensuring the high smoothness of the path, which is beneficial to the smooth running of the vehicle and the reduction of path tracking error.
• The performance of obstacle avoidance does not depend on parameter adjustment due to collision time can be determined to the appropriate value according to demand.This enhances the adaptability of the method to different environments.
Compared with current obstacle avoidance methods, such as [11][12][13][14][15][16], the proposed method implements obstacle avoidance for obstacles with more complex motions, at the same time, the planned path has high smoothness, and the planning process is less dependent on parameters.The remainder of this paper is organized as follows.In Section 2, the problem statement is described.Section 3 introduces the design of HSPI-OAM.The simulation and analysis are provided in Section 4. Finally, Section 5 gives the conclusion.

The smoothness of path
The smoothness of path is critical to the smooth running of vehicle and the accuracy of path tracking.In general, the path planning problem is considered as [25,28]: where U t+k,t denotes the cost of obstacle, k y tþk;t À y tþk;t des k 2 Q is the cost for tracking the desired path, u tþkÀ 1;t c k 2 R represents the cost of control inputs, k u tþkÀ 1;t À u tþkÀ 2;t c k 2 S is the cost of violation of control input and k � k k 2 P denotes the cost of slack variables.Q, R, S and P are the corresponding weight matrix.When the vehicle is far from the obstacle, the value of U is small, while the other penalty terms are relatively large, and the path does not change for obstacle avoidance.Only when the vehicle is close to the obstacle, the value of U will increase dramatically, and the path will change for obstacle avoidance.At this time, the time for obstacle avoidance is not much, and the change of path must be relatively drastic.

The dependency issues for parameter
Generally speaking, the implementation of obstacle avoidance often depends on evaluation functions, and needs to evaluate a variety of objects, including obstacle avoidance, lane keeping, etc.These evaluation functions are usually scaled by weight coefficients.In dynamic environment, the same group of weight coefficients may not achieve good obstacle avoidance effect in the changing environment.In expressions (1), U is specifically expressed as: where k 1 and k 2 denote the intensity and shape parameters, respectively.s dX X s ; dY Y s � � is the signed distance which is consider the velocity of vehicle and obstacle, and more information about it can be found in [25].In expressions ( 1) and ( 2), the cost of obstacle and the cost of other items have their respective coefficients.For specific environment, good obstacle avoidance effect can be achieved through adjusting these coefficients.However, when the velocity of obstacle is changed, the same parameters may not work well, or even cause obstacle avoidance to fail.The obstacle avoidance with different parameters is shown in Fig 1.
In Fig 1, the method proposed by [25] is used to avoid moving obstacles.The only difference between path 1 and path 2 is that k1 = 0.1 in path 1 and k1 = 0.01 in path 2. Obviously path 1 completes obstacle avoidance, while path 2 collides with the obstacle.The performance of obstacle avoidance depends on appropriate parameters.Usually in a dynamic environment, the same parameter is difficult to adapt to environmental changes.

Section 3: The design of HSPI-OAM
The existing methods ignore the acceleration of obstacle, and the avoidance maneuver is not timely and depend heavily on parameters.It may fail to achieve high-performance obstacle avoidance, or even lead to collision.To solve this problem, a highly smooth and parameter independent obstacle avoidance method for autonomous vehicle with velocity-varying C v denotes the information of virtual collision point.4t v is the advance time for virtual collision.4d v is the additional offset for avoiding collision.The relative motion model uses the motion parameters of vehicle and obstacle to obtain the predicted relative motion path.The minimum predicted distance between the vehicle and the obstacle and corresponding time can be predicted by combining the relative motion path and the information of virtual obstacle.In the virtual collision point model, the location of the virtual collision point is calculated using the time advance for virtual collision and the information of virtual obstacle.The virtual path is reconstructed by the input value to obtain the required average acceleration.The planned path and the motion parameters of vehicle at the next moment can be obtained from the vehicle motion model.
In order to visualize the problem, the moving obstacle is treated as stationary and the velocity of the moving obstacle is appended to the vehicle.For example, the velocity of the vehicle is v v , the velocity of the moving obstacle is v o , and after the obstacle is regarded as stationary and the velocity of the moving obstacle is attached to the vehicle, the velocity of the vehicle is v v -v o and the velocity of the obstacle is regarded as 0. Under such conditions, the relative motion parameters of the vehicle are expressed as: where [a rx a ry v rx v ry x r y r ] T represent the motion parameters of the vehicle relative to the obstacle, including its longitudinal acceleration, lateral acceleration, longitudinal velocity, lateral velocity, longitudinal position and lateral position.
In order to improve the efficiency, the vehicle in this paper adopts the single point mass model considering acceleration [18].And the relative motion model of the vehicle is expressed as: where t represents sampling time interval.The predicted relative motion path can be obtained by the relative motion model.And the slope of the predicted relative motion path can be expressed as: Since the obstacle is considered stationary, O i can be considered as the initial position of the obstacle, and it can be denoted as O i ¼ ½x 0 o y 0 o � T , and the slope from O i to P r is: When the distance from O i to P r is the smallest, there is: When expression ( 12) is true, d p and t p can be obtained.Then the virtual collision point model can be constructed as shown in Fig 3.
In general, if d p is less than the collision radius R of the obstacle, the path needs to be offset outward by R − d p along d p in order to avoid collision.This will increase the lateral offset after obstacle avoidance because of the lateral acceleration.In order to reduce the lateral offset, O v is simulated to collide with the vehicle in advance, and the advance collision time is 4t v .In the virtual collision point model, d v is expected to be obtained.The coordinate of C i is expressed as: The coordinate of C v is expressed as: The coordinate of O v is expressed as: Then d v can be calculated as: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi In the virtual collision point model, additional offset 4d v is needed to avoid collision.And the additional offset needs to be done in (t p − 4t v ) time.Therefore, the acceleration required is: The corresponding longitudinal and lateral acceleration components are: where atan2 is an extension of the arctangent function, and it returns value in the range (−pi, pi].The expression ( 15)-( 22) is subject to t 2 [0, expected accelerations are: where v refx and v refy denote the longitudinal and lateral reference velocity of vehicle.avx and a vy are the accelerations required for relative motion, and the actual acceleration components required by the vehicle are: Finally, the high-performance path for obstacle avoidance and the vehicle motion parameters at the next moment can be obtained using the vehicle motion model.It should be pointed out that the proposed method is planned at the acceleration level and the acceleration is equalized in the virtual collision point model, so the smoothness of the planned path is greatly improved.

Section 4: and analysis
The performance of HSPI-OAM is tested by four comparative simulation tests, and improved artificial potential field method (IAPF) is used as the contrast method.The IAPF method uses the combination of artificial potential field and model prediction, both of which are classical path planning methods.Especially, the combination of the two methods makes the comparison method have strong dynamic planning ability by using prediction ability.Meanwhile, the comparison method can consider the actual physical constraints of vehicles in the model prediction, so that the path planned by the comparison method is smoother.Therefore, it is more comparable with the method proposed in this paper.In IAPF method, the velocity of obstacle is taken into account and the cost function is designed as expressions (1) and (2).More information about the IAPF method can be found in [28].The result of test is summarized in Table 1.β max is maximum side slip angle of vehicle.γ max denotes the maximum yaw rate of a vehicle.e max represents the maximum tracking error of vehicle.Generally speaking, after completing obstacle avoidance, the vehicle needs to return to the global path.At this time, the values of β max , γ max and e max can be reduced through parameter settings.For example, more time and distance can be used to the regression path smoother, so as to reduce the above variables.Therefore, the β max , γ max and e max in Table 1 refer to the values before obstacle avoidance.The partial parameter of test is set in Table 2. ξ O and ξ V are the motion parameter of obstacle and vehicle as described in Fig 2 .4t v is the advance time for virtual collision as described in Fig 2 .Q and k 1 are the relative weight coefficient as described in expressions ( 1) and ( 2).In the proposed method, only 4t v needs to be determined.This parameter is first given an approximate value through experience, and then a better value is determined through multiple simulation tests.

Test 1
The results of Test 1 are shown in    2, while the side slip angle, yaw rate and tracking error of AV remain in a very small range.In IAPF1, the same parameters as in Test 1 are used.Although obstacle avoidance is still completed, the path is indeed greatly changed.In IAPF1, the path implements sudden maneuver for obstacle avoidance, which is not in line with human obstacle-avoidance operation, but also greatly damages the smoothness of the path.In IAPF2, the weight of obstacle avoidance cost is reduced to k 1 = 0.0015, and the path similar to IAPF in Test 1 is obtained.Therefore, the performance of obstacle avoidance in IAPF depends on the choice of parameters, while HSPI-OAM achieves good obstacle avoidance performance in Test 1 and Test 2 by using the same parameters.

3
The results of Test 3 are shown in Figs 12-15.Unlike Tests 1 and 2, both obstacle and vehicle in Test 3 have longitudinal and lateral acceleration, so their trajectories are curved.In HSPI-OAM, the performance parameter is still unchanged, and AV still achieves obstacle avoidance while the side slip angle, yaw rate and tracking error remain at fairly small values.k 1 = 0.1 in IAPF1 is the same as that in Test 1. Different from Test 1 and Test 2, the vehicle collides with the obstacle because k 1 = 0.1 value is too small in Test 3. In IAPF2, k 1 is adjusted to k 1 = 1.5 to complete obstacle avoidance again.Not only do IAPF1 and IAPF2 depend on the parameter, but the side slip angle, yaw rate and tracking error in IAPF1 and IAPF2 is greater than those in HSPI-OAM.

Test 4
The results of Test  in the same direction.In HSPI-OAM, the performance parameter is still unchanged, and AV still achieves obstacle avoidance while the side slip angle, yaw rate and tracking error at fairly small values.k 1 = 1.5 in IAPF1 is the same as that in IAPF2 of Test 3.While the parameter that can realize obstacle avoidance in IAPF2 of Test 3 has a collision in this working condition.In IAPF2, k 1 = 1.5 is adjusted to k 1 = 50 to avoid collision.
In addition, the comparison method uses the combination of artificial potential field and model prediction method to plan the path.Adjusting the prediction time domain in the model prediction can improve the performance of the comparison method to a certain extent.For example, we use 5, 10 and 15 to as the prediction time.The longer the prediction time domain, the earlier the comparison algorithm can implement the path planning, thus smoothing the path to a certain extent.However, the required cost will also increase.More importantly, the smoothness of its path cannot be compared with that of the proposed method, and the improvement of yaw rate, side slip angle and tracking error of the vehicle controlled by the comparison method is also limited.And the proposed method is planned at the acceleration level and the acceleration is equalized in the virtual collision point model, so the smoothness of the planned path is greatly improved.

Section 5: Conclusions
The proposed HSPI-OAM can realize highly smooth and parameter independent obstacle avoidance in the complex obstacle avoidance situation where both the obstacle and the vehicle have acceleration.In four different working conditions, the comparison method needs to adjust parameters according to different working conditions to achieve obstacle avoidance, and the smoothness of the path is not as good as HSPI-OAM.HSPI-OAM can achieve obstacle avoidance and obtain a smooth path without adjusting parameter, which is conducive to the stability of the vehicle and the accuracy of path tracking.Since the proposed method accurately designs the required acceleration according to the motion information of the moving obstacle and vehicle, it may be necessary to add additional strategies for pre-processing each obstacle in the face of multiple obstacles, so as to improve the adaptability of the method to the multiobstacle environment, which is also a direction for the subsequent efforts of the method.

Figs 4 - 7 .
In Test 1, the obstacle has only longitudinal acceleration.As shown in Fig 4, The arrow indicates the direction of motion.The area surrounded by the star symbol represents the size of the obstacle.The area surrounded by the red star symbol is the initial position of the obstacle, and the areas surrounded by the star symbol in other colors are the positions of the obstacle when AV is closest to the obstacle in the corresponding method.It is not difficult to see that both methods HSPI-OAM and IAPF can achieve safe

Test 2
The results of Test 2 are shown in Figs 8-11.Compared with Test 1, the motion parameter in Test 2 is changed.Corresponding to the change of motion parameter, the performance parameter involved in HSPI-OAM does not change as shown in Table

Table 2 . The parameter of tests. Test Motion parameters Method Performance parameters
4 are shown in Figs 16-19.As in Test 3, both obstacle and vehicle in Test 4 have longitudinal and lateral acceleration.The difference is that AV and obstacle are moving